package util;

import java.awt.Font;
import java.awt.Rectangle;

import javax.swing.JLabel;

/**
 * 
 * @author zhangzuoqiang <br/>
 *         Date: Aug 25, 2011
 */
public class astLighweightLabel extends JLabel {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	protected static astLighweightLabel sharedInstance;

	/**
	 * Initializes the shared instance.
	 */
	static {
		try {
			sharedInstance = new astLighweightLabel();
		} catch (Exception e) {
			// ignore
		}
	}

	/**
	 * 
	 */
	public static astLighweightLabel getSharedInstance() {
		return sharedInstance;
	}

	/**
	 * 
	 * 
	 */
	public astLighweightLabel() {
		setFont(new Font(astConstants.DEFAULT_FONTFAMILY, 0,
				astConstants.DEFAULT_FONTSIZE));
	}

	/**
	 * Overridden for performance reasons.
	 * 
	 */
	public void validate() {
	}

	/**
	 * Overridden for performance reasons.
	 * 
	 */
	public void revalidate() {
	}

	/**
	 * Overridden for performance reasons.
	 * 
	 */
	public void repaint(long tm, int x, int y, int width, int height) {
	}

	/**
	 * Overridden for performance reasons.
	 * 
	 */
	public void repaint(Rectangle r) {
	}

	/**
	 * Overridden for performance reasons.
	 * 
	 */
	protected void firePropertyChange(String propertyName, Object oldValue,
			Object newValue) {
		// Strings get interned...
		if (propertyName == "text") {
			super.firePropertyChange(propertyName, oldValue, newValue);
		}
	}

	/**
	 * Overridden for performance reasons.
	 * 
	 */
	public void firePropertyChange(String propertyName, byte oldValue,
			byte newValue) {
	}

	/**
	 * Overridden for performance reasons.
	 * 
	 */
	public void firePropertyChange(String propertyName, char oldValue,
			char newValue) {
	}

	/**
	 * Overridden for performance reasons.
	 * 
	 */
	public void firePropertyChange(String propertyName, short oldValue,
			short newValue) {
	}

	/**
	 * Overridden for performance reasons.
	 * 
	 */
	public void firePropertyChange(String propertyName, int oldValue,
			int newValue) {
	}

	/**
	 * Overridden for performance reasons.
	 * 
	 */
	public void firePropertyChange(String propertyName, long oldValue,
			long newValue) {
	}

	/**
	 * Overridden for performance reasons.
	 * 
	 */
	public void firePropertyChange(String propertyName, float oldValue,
			float newValue) {
	}

	/**
	 * Overridden for performance reasons.
	 * 
	 */
	public void firePropertyChange(String propertyName, double oldValue,
			double newValue) {
	}

	/**
	 * Overridden for performance reasons.
	 * 
	 */
	public void firePropertyChange(String propertyName, boolean oldValue,
			boolean newValue) {
	}

}